<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- <script src="http://unpkg.com/vue@2.6"></script> -->
    <script src="../dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <h1>{{counter}}</h1>
      <comp></comp>
    </div>
    <script>
      Vue.component("comp", {
        template: "<input v-model='counter' />",
        data() {
          return {
            counter: 10,
          };
        },
        created(){
          console.log('comp created')
        },
        mounted() {
          console.log('comp mounted')
        },
      });
      const app = new Vue({
        data() {
          return {
            counter: 2,
          };
        },
        created(){
          console.log('parent created')
        },
        mounted() {
          console.log('parent mounted')
        },
      });
      app.$mount("#app");
    </script>
  </body>
</html>
